
#include "com_api.h"


int is_touch_in_target(const lv_point_t *p, const lv_area_t *t) 
{
	int x1 = (t->x1-5);
	int x2 = (t->x2+5);
	int y1 = (t->y1-5);
	int y2 = (t->y2+5);

    if (p->x >= x1 && 
        p->x <= x2 && 
        p->y >= y1 && 
        p->y <= y2 ){
        return 1;
    }

	l_d("pxy=%d:%d\n",p->x,p->y);
	l_d("txy=%d:%d:%d:%d\n",t->x1,t->x2,t->y1,t->y2);
	l_d("txy2=%d:%d:%d:%d\n",x1,x2,y1,y2);

    return 0;
}